import pandas as pd
from sqlalchemy import create_engine
from datetime import datetime
import openpyxl

# 运费、毛利、成本的中间统计表
engine = create_engine('mysql+pymysql://jsbi:jsbi-1701@47.114.55.19:9011/biv1?charset=utf8')
con = engine.connect()

df = pd.read_excel("D:/dfAll.xlsx")
print(df)

# 解决可能出现的超时问题bugfix 2020.08.18
con.connection.connection.ping(reconnect=True)
df.to_sql(name='test1', con=con, if_exists='append', index=False)